package com.competition.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "farmer")
public class Farmer {

    @Id
    @Column(name = "farmer_id", length = 255, nullable = false, unique = true)//"最美农民排行榜id"
    private String farmerId;

    @Column(name = "user_id", length = 255, nullable = true)//"用户id"
    private String userId;

    @Column(name = "farmer_count", nullable = true )//"票数"
    private Integer farmerCount;


}
